package 原型模式;

public class PrototypeTest {

    public static void main(String[] args) throws CloneNotSupportedException {
        原型模式.Demo demo =new 原型模式.Demo();
        demo.setDemoName("我的名字");
        System.out.println(demo);
        System.out.println(demo.clone());
        原型模式.Product product = new 原型模式.Product("part1","part2","part3","part4",demo);
        原型模式.Product clone = product.clone();
        System.out.println(product);
        System.out.println(clone);
        原型模式.Product clone2 = product.clone2();
        System.out.println(clone2);
    }
}
